package world.square;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import world.edges.Border;
import world.edges.Door;
import world.edges.Wall;
import world.placement.Direction;


public class TransparentTest {
	private static Transparent transparentSquare;

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}
	
	@Before
	public void setUp() throws Exception { 
		transparentSquare = new Transparent();
	}
	
	@Test
	public final void canHaveAsBorder_Cases(){
		assertFalse(transparentSquare.canHaveAsBorder(new Border(new Wall(false),Direction.NORTH)));
		assertTrue(transparentSquare.canHaveAsBorder(new Border(new Door(false),Direction.NORTH)));
		assertFalse(transparentSquare.canHaveAsBorder(null));
		transparentSquare.addBorders(new Border(new Door(false), Direction.SOUTH));
		assertFalse(transparentSquare.canHaveAsBorder(new Border(new Door(false),Direction.EAST)));
	}

	@Test
	public final void hasProperBorders_SingleCase(){
		assertTrue(transparentSquare.hasProperBorders());
	}
	
	@Test
	public final void canRemoveBorderInDirection_SingleCase(){
		assertFalse(transparentSquare.canRemoveBorderInDirection(Direction.NORTH));
	}
}
